package com.why.whyoj.judge.codesanbox;

import com.why.whyoj.judge.codesanbox.impl.ExampleCodeSandbox;
import com.why.whyoj.judge.codesanbox.impl.RemoteCodeSandbox;
import com.why.whyoj.judge.codesanbox.impl.ThirdPartyCodeSandbox;

public class CodeSandBoxFactory {
    public static CodeSandBox newInstance(String type) {
        switch (type) {
            case "remote":
                return new RemoteCodeSandbox();
            case "example":
                return new ExampleCodeSandbox();
            case "thirdparty":
                return new ThirdPartyCodeSandbox();
            default:
                return new ExampleCodeSandbox();
        }
    }
}
